Skip to content

fix: emoji breaking box alignment - #404

Open
ConnorBerghoffer wants to merge 1 commit into
unjs:mainfrom
ConnorBerghoffer:fix/emoji-box-width
Open

fix: emoji breaking box alignment#404
ConnorBerghoffer wants to merge 1 commit into
unjs:mainfrom
ConnorBerghoffer:fix/emoji-box-width

Conversation

@ConnorBerghoffer

Copy link
Copy Markdown

Emojis take up 2 visual columns but were counted as 1 character, causing the box right edge to misalign. Now using stringWidth instead of .length which properly calculates visual width for emojis and other wide characters.

Fixes #402

Emojis take up 2 visual columns but were counted as 1 character, causing the box right edge to misalign. Now using stringWidth instead of .length which properly calculates visual width for emojis and other wide characters.

Fixes unjs#402
@gaojunran

Copy link
Copy Markdown

@pi0 check this pr thank you! I also need this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using emoji breaks consola.box

2 participants